package com.ieslab.mvc;

import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;

/** 
 * 文件名: AdvancedWebConfig <p>
 * 功能说明: customize a property on one of the beans created
in {@link WebMvcConfigurationSupport} or perhaps to provide your own instance. This requires two things
-- remove the @EnableWebMvc annotation in order to prevent the import and then extend directly from
WebMvcConfigurationSupport. <p> 
 * 创建时间: 2016年6月23日 上午8:04:52 <p> 
 * @author 郭凯强
 * @version 0.0.1 
 * @since JDK 1.7  
 */
// @Configuration
public class AdvancedWebConfig extends WebMvcConfigurationSupport {
	@Override
	protected void addInterceptors(InterceptorRegistry registry) {
		super.addInterceptors(registry);
	}

	@Override
	@Bean
	public RequestMappingHandlerAdapter requestMappingHandlerAdapter() {
		// Create or let "super" create the adapter
		// Then customize one of its properties
		return super.requestMappingHandlerAdapter();
	}
}
